home *** CD-ROM | disk | FTP | other *** search
- /*
- * The original copyright owners of the accompanying source code files have
- * agreed to place such code into the public domain. Accordingly, anyone
- * who receives or obtains a copy of such source code is freely entitled to
- * reproduce, use and otherwise exploit such code (including the right to
- * make derivative works), at his/her own risk and expense, without any
- * obligation or liability to the original copyright owners.
- *
- * We would appreciate (but do not require) that the following message be
- * included in any derivative works:
- *
- * "Portions of this program were developed by Peter Broadwell, Rob Myers
- * and Robin Schaufler while working in Silicon Valley."
- *
- * The accompanying source code files and related documentation materials
- * are distributed on an "AS IS" basis, without any warranties or
- * guarantees of any kind. All implied warranties, including the implied
- * warranties of merchantability and of fitness for any particular purpose,
- * are expressly disclaimed.
- */
- #include "gl.h"
- #include "geom.h"
- #include "selectors.h"
- #include "class.h"
- #include "classIds.h"
- #include "mbox.h"
- #include "individual.h"
- #include "behavior.h"
- #include "doers.h"
-
- #include "sea.h"
- #include "colors.h"
-
- extern class indivClass;
- model seaWeed;
- extern char *plantinit();
-
- fcnTable seaTable[] = {
- INIT, plantinit,
- EOTABLE,
- };
-
- class seaClass = {
- &indivClass,
- seaTable,
- sizeof(sea),
- SEA,
- };
-
- sea seaTemplate = {
- /* inst */
- &seaClass, /* myClass pointer */
- NULL, /* classFunctions */
- 0, /* nFunctions */
- /* mailbox */
- NULL, /* subscribers */
- NULL, /* subscribedTo */
- /* individual */
- {3000,500,-5000}, /* position */
- {0,0,0}, /* lastPosition */
- {1,0,0}, /* delta */
- {0,0,0}, /* velocity */
- {0,0,0}, /* avelocity */
- {0,0,0}, /* acceleration */
- 1.0, /* speed */
- {0,0,10}, /* heading */
- {0,900,0}, /* rotation */
- {0,0,0}, /* influence */
- 1.0, /* scale */
- &seaWeed, /* model */
- NULL, /* flags */
- NULL, /* curVars */
- NULL, /* controls */
- /* sea */
- 90, /* length */
- };
-
- model seaWeed = {
- NULL, /* next model segment */
- NULL, /* child model segments */
- 0, /* geometry compiled yet? */
- 0, /* compiled geometry object Id */
- NULL, /* point dictionary */
- NULL, /* polygon descriptions */
- { 0,0,0}, /* centroid */
- SEAWEED_COLOR, /* color */
- SEAWEED_TEXTURE, /* texture */
- FALSE, /* outlined */
- {0,0,0}, /* rotation */
- {0,0,0}, /* translate */
- {1.0,1.0,1.0}, /* scale */
- 60, /* declasse */
- };
-